#Matan Keidar 066500992
#Eliahu Khalastchi 040854705


from ModelUtils import *
from Backoff import Backoff


utils = ModelUtils()

backoff = utils.getBackoffModel()

(myLambda,bestPerplexity) = backoff.calcBestLambda("train10.txt")

print "the lambda chosen is",myLambda
print "its perplexity is",bestPerplexity
print "the perplexity is the test file is",backoff.calcPerplexityFromTestFile("test_splitted.txt")

print "debug of 'chair' is %f" % (backoff.debug("chair"))
print "debug of 'bridge' is %f" % (backoff.debug("bridge"))
print "debug of 'conscious' is %f" % (backoff.debug("conscious"))

print "Done - END PROGRAM"


    